home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / tontie_hammer.swf / scripts / frame_27 / DoAction.as
Text File  |  2012-01-07  |  2KB  |  90 lines

  1. function piko_ato(targ)
  2. {
  3.    if(eval("_root.henkan" + targ) == 0)
  4.    {
  5.       _root.piko.push(eval("_root.d" + targ));
  6.    }
  7.    else
  8.    {
  9.       _root.piko.push(eval("_root.d" + eval("_root.henkan" + targ)));
  10.    }
  11.    _root.piko_ok = 0;
  12.    with(_root.pikopiko)
  13.    {
  14.       gotoAndStop("on");
  15.    }
  16.    with(_root.key_check)
  17.    {
  18.       gotoAndStop("on");
  19.    }
  20. }
  21. function piko_ato_s(targ)
  22. {
  23.    _root.piko.push(eval("_root.s" + targ));
  24.    _root.piko_ok = 0;
  25.    with(_root.pikopiko)
  26.    {
  27.       gotoAndStop("on");
  28.    }
  29.    with(_root.key_check)
  30.    {
  31.       gotoAndStop("on");
  32.    }
  33. }
  34. function damage(p)
  35. {
  36.    life_i = _root.life.red._width - p;
  37.    if(life_i <= 0)
  38.    {
  39.       _root.life.red._visible = 0;
  40.       _root.gotoAndPlay("over");
  41.    }
  42.    _root.life.red._width = life_i;
  43. }
  44. function damage_ooo(p)
  45. {
  46.    if(_root.lvup == 0)
  47.    {
  48.       life_i = _root.life.red._width - p;
  49.       if(life_i <= 0)
  50.       {
  51.          _root.life.red._visible = 0;
  52.          _root.gotoAndPlay("over");
  53.       }
  54.       _root.life.red._width = life_i;
  55.    }
  56. }
  57. function damage_coin()
  58. {
  59.    _root.money -= 1;
  60. }
  61. function kaihuku(p)
  62. {
  63.    _root.life.red._width += p;
  64.    if(_root.life.red._width > _root.life.black._width)
  65.    {
  66.       _root.life.red._width = _root.life.black._width;
  67.    }
  68. }
  69. stop();
  70. with(lv_up)
  71. {
  72.    gotoAndStop(1);
  73. }
  74. _root.gameframe = _currentframe;
  75. _root.lvup = 0;
  76. _root.piko_ok = 1;
  77. _root.sound2("game");
  78. i = 1;
  79. while(i <= 9)
  80. {
  81.    set("_root.henkan" + i,0);
  82.    i++;
  83. }
  84. i = 1;
  85. while(i <= 9)
  86. {
  87.    set("_root.enemy" + i,0);
  88.    i++;
  89. }
  90.